#include "i386/kernel/screen.h"
#include "i386/kernel/trap.h"
#include "i386/kernel/timer.h"
#include "i386/kernel/i8259.h"
#include "i386/mm/pagging_init.h"
#include "common/linkage.h"

extern void kernel_main(void);
void startup_32(void);

asmlinkage int __init start_kernel(void) {
  /*
   */
  init_screen();
  
  char msg[] = "Entered PM Model, Now!";
  puts(msg);

  /*
   * initialize trap
   */
  trap_init();

  /*
   *  IRQ init
   */
  init_IRQ();


  /*
    init timer
  */
  time_init();

  // startup_32();

  puts("entering kernel.");
  kernel_main();
  
  return 0;
}
